package com.maimao.model.common.baidu;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

/**
 * 百度IP定位返回结果 { "address": "CN|北京|北京|None|OTHER|0|0", "content": { "address": "北京市", "address_detail": { "city": "北京市",
 * "city_code": 131, "district": "", "province": "北京市", "street": "", "street_number": "" }, "point": { "x":
 * "116.40387397", "y": "39.91488908" } }, "status": 0 }
 *
 * @author MaoLin Wang
 * @date 2021/4/25 下午5:01
 */
@Data
public class BaiDuIpRes {

    public static final Integer OK_STATUS = 0;

    private String address;
    private Content content;
    private Integer status;


    @Data
    public static class Content {
        private String address;
        @JSONField(name = "address_detail")
        private AddressDetail addressDetail;
        private Point point;
    }

    @Data
    public static class AddressDetail {
        private String city;
        @JSONField(name = "city_code")
        private Integer cityCode;
        private String district;
        private String province;
        private String street;
        @JSONField(name = "street_number")
        private String streetNumber;
    }

    @Data
    public static class Point {
        private String x;
        private String y;
    }
}
